<?php /* Smarty version 2.6.14, created on 2015-01-15 12:06:18
         compiled from break_app.add.html */ ?>
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
smarty_core_load_plugins(array('plugins' => array(array('function', 'html_options', 'break_app.add.html', 18, false),)), $this); ?>
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "header.html", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>

 <!-- debug 
<script type="text/javascript" src="../js/moxie.js"></script>
<script type="text/javascript" src="../js/plupload.dev.js"></script>
-->

<form action="<?php echo $this->_tpl_vars['formAction']; ?>
" method="POST" <?php if ($this->_tpl_vars['is_validator']): ?> id="adminform" onsubmit="return Validator.Validate(this)" <?php endif; ?>>
<table class="adminform" border="0" cellspacing="0">
	<tr>
    	<th><?php echo $this->_tpl_vars['systemLang']['app']; ?>
</th>
    </tr>
    <tr>
    	<td>

    	<?php echo $this->_tpl_vars['systemLang']['type']; ?>
: 
       <select name="data[type]" >
		    	<?php echo smarty_function_html_options(array('options' => $this->_tpl_vars['type'],'selected' => $this->_tpl_vars['channel']['app_type']), $this);?>

    	 </select>   	   	<br />
     	<?php echo $this->_tpl_vars['systemLang']['state']; ?>
: 
       <select name="data[state]" >
		    	<?php echo smarty_function_html_options(array('options' => $this->_tpl_vars['state'],'selected' => $this->_tpl_vars['channel']['app_state']), $this);?>

    	 </select>   	   	<br />
		<?php echo $this->_tpl_vars['systemLang']['iiapple_id']; ?>
:<input type="text" name="data[iiapple_id]" value="<?php echo $this->_tpl_vars['channel']['app_iiapple_id']; ?>
" class="text"  /><br />
    	<?php echo $this->_tpl_vars['systemLang']['app']; ?>
:<input type="text" name="data[app]" value="<?php echo $this->_tpl_vars['channel']['app_name']; ?>
" class="text"  /><br />
    	<?php echo $this->_tpl_vars['systemLang']['taxis']; ?>
:<input type="text" name="data[taxis]" value="<?php echo $this->_tpl_vars['channel']['app_taxis']; ?>
" class="text" dataType="Require" msg="<?php echo $this->_tpl_vars['systemLang']['payNameEnError']; ?>
" /><br />
    	<?php echo $this->_tpl_vars['systemLang']['version']; ?>
:<input type="text" name="data[version]" value="<?php echo $this->_tpl_vars['channel']['app_version']; ?>
" class="text"  /><br />
    	<?php echo $this->_tpl_vars['systemLang']['recommend']; ?>
:<br />
    	<textarea rows="" cols=""  name="data[recommend]" ><?php echo $this->_tpl_vars['channel']['app_recommend']; ?>
</textarea>
    	<br />
    	<?php echo $this->_tpl_vars['systemLang']['description']; ?>
:<br />
    	<textarea rows="" cols=""  name="data[description]" ><?php echo $this->_tpl_vars['channel']['app_description']; ?>
</textarea><br /><br />
    
    	<?php echo $this->_tpl_vars['systemLang']['lowest_version']; ?>
:<input type="text" name="data[lowest_version]" value="<?php echo $this->_tpl_vars['channel']['app_lowest_version']; ?>
" class="text"  /><br />
    	<?php echo $this->_tpl_vars['systemLang']['device']; ?>
:
       <select name="data[device]" >
		    	<?php echo smarty_function_html_options(array('options' => $this->_tpl_vars['device'],'selected' => $this->_tpl_vars['channel']['app_device']), $this);?>

    	 </select>   	   	<br />
    	</td>
    </tr>
  	<tr>
    	<th><?php echo $this->_tpl_vars['systemLang']['icon']; ?>
</th>
    </tr>  

        <tr>
    	<td>

    	<input id="input_img_url4" msg="<?php echo $this->_tpl_vars['systemLang']['icon']; ?>
" datatype="Require" readonly="readonly" type="text" name="data[icon]" value="<?php echo $this->_tpl_vars['channel']['app_icon']; ?>
" id="input_img_url4"  class="text" />
      <input type="button" name="upload" value="<?php echo $this->_tpl_vars['systemLang']['upload']; ?>
"  class="Dialog button" rel="{type:'iframe',size:{w:600,h:400},url:'<?php echo @BASEURI; ?>
file_upload/recharge/input_img_url4',off:'hidden'}"/>
        </td>
    </tr>	

   <tr>
    	<th><?php echo $this->_tpl_vars['systemLang']['bunddle_id']; ?>
</th>
    </tr>  

        <tr>
    	<td>
    	<input type="text" name="data[bundle_id]" value="<?php echo $this->_tpl_vars['channel']['app_bundle_id']; ?>
" class="text"  />
 
        </td>
    </tr>	

   <tr>
    	<th><?php echo $this->_tpl_vars['systemLang']['downnum']; ?>
</th>
    </tr>  

        <tr>
    	<td>
    	<input type="text" name="data[downnum]" value="<?php echo $this->_tpl_vars['channel']['app_downnum']; ?>
" class="text"  id="downnum" />
 
        </td>
    </tr>	     
    <tr>
    	<th><?php echo $this->_tpl_vars['systemLang']['size']; ?>
</th>
    </tr>  

        <tr>
    	<td>
    	<input type="text" name="data[size]" value="<?php echo $this->_tpl_vars['channel']['app_size']; ?>
" class="text"  id="size"  readonly />
 
        </td>
    </tr>	     
   	<tr>
    	<th>
			<?php echo $this->_tpl_vars['systemLang']['downurl']; ?>
:<br /><input type="text" name="data[downurl]" value="<?php echo $this->_tpl_vars['channel']['app_down_url']; ?>
" class="text"  id='downurl'  readonly  style="width:500px" /><br />
			
			<div id="container">
			
			    <button id="pickfiles" class="Dialog button" >选择文件</button>
			    <button id="uploadfiles" class="Dialog button" >开始上传</button>
			
			</div>
			<div id="filelist">Your browser doesn't have Flash, Silverlight or HTML5 support.</div>
			<pre id="console"></pre>
			</th>
    </tr>     
    <tr>
    	<td><input type="submit" name="sb" value="<?php echo $this->_tpl_vars['systemLang']['submit']; ?>
" class="button" /></td>
    </tr>
</table>

<?php if ($this->_tpl_vars['channel']): ?>
<input type="hidden" name="app_id" value="<?php echo $this->_tpl_vars['channel']['app_id']; ?>
" />
<?php endif; ?>
</form>


<script type="text/javascript">
// Custom example logic

var uploader = new plupload.Uploader({
	runtimes : 'html5,flash,silverlight,html4',
	browse_button : 'pickfiles', // you can pass in id...
	container: document.getElementById('container'), // ... or DOM Element itself
	url : '/file_upload/plupload',
	flash_swf_url : '<?php echo @BASEURI; ?>
public/plupload/Moxie.swf',
	silverlight_xap_url : '<?php echo @BASEURI; ?>
public/plupload/Moxie.xap',
	
	filters : {
		max_file_size : '2000mb',
		mime_types: [

		]
	},

	init: {
		PostInit: function() {
			document.getElementById('filelist').innerHTML = '';

			document.getElementById('uploadfiles').onclick = function() {
				uploader.start();
				return false;
			};
		},

		FilesAdded: function(up, files) {
			plupload.each(files, function(file) {
				document.getElementById('filelist').innerHTML += '<div id="' + file.id + '">' + file.name + ' (' + plupload.formatSize(file.size) + ') <b></b></div>';
			});
		},

		UploadProgress: function(up, file) {
			document.getElementById(file.id).getElementsByTagName('b')[0].innerHTML = '<span>' + file.percent + "%</span>";
		},
		
        FileUploaded: function(up, file, info) {
	                // Called when file has finished uploading
		var json=eval("("+info['response']+")");//
	    document.getElementById('downurl').value =json.result;
		document.getElementById('size').value =json.size;
	      
	    },		

		Error: function(up, err) {
			document.getElementById('console').innerHTML += "\nError #" + err.code + ": " + err.message;
		}
	}
});

uploader.init();

</script>

 